package com.cbwl.eoas.common.framework.utils;

import java.io.PrintWriter;
import java.io.StringWriter;


/**
 * <p>[描述信息：异常处理工具类]</p>
 *
 * @author yuyunbo
 * @version 1.0 Created on 2015-1-8 下午01:49:44
 */
public class ExceptionUtils {
	
	public static String getTrace(Throwable t) {
		String exception = "";
        StringWriter stringWriter= new StringWriter();
        PrintWriter writer= new PrintWriter(stringWriter);
        t.printStackTrace(writer);
        StringBuffer buffer= stringWriter.getBuffer();
        exception = buffer.toString();
        writer.close();
        return exception;
    }

	
}
